module Blog::PostsHelper

  def show_comments(comment, depth=0, &block)
    block.call(comment, depth)
    depth = depth + 1
    comment.comments.each do |c|
      show_comments(c, depth, &block)
    end
  end

end
